-
Notifications
You must be signed in to change notification settings - Fork 896
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add GitHub workflow files #7585
base: main
Are you sure you want to change the base?
Add GitHub workflow files #7585
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7585 +/- ##
==========================================
+ Coverage 80.06% 82.27% +2.20%
==========================================
Files 190 238 +48
Lines 37181 43790 +6609
Branches 9450 10995 +1545
==========================================
+ Hits 29770 36028 +6258
- Misses 2997 3425 +428
+ Partials 4414 4337 -77 ☔ View full report in Codecov by Sentry. |
483aa0b
to
aaa5706
Compare
UPDATE_FILE="$CURRENT_VERSION--$NEW_VERSION.sql" | ||
DOWNGRADE_FILE="$NEW_VERSION--$CURRENT_VERSION.sql" | ||
LAST_UPDATE_FILE="$LAST_VERSION--$CURRENT_VERSION.sql" | ||
LAST_DOWNGRADE_FILE="$CURRENT_VERSION--$LAST_VERSION.sql" | ||
|
||
RELEASE_BRANCH_EXISTS=$(git branch -a |grep -c "origin/$RELEASE_BRANCH"|cut -d ' ' -f 1) | ||
|
||
if [[ $RELEASE_BRANCH_EXISTS == '0' ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this script can also create the release branch? I think that for ease of understanding, we should choose one of these options:
- make this script create the branch if it doesn't exist, and remove the small script that only handles branch creation
- keep the small script for branch creation, but remove it from this one, and make it require the branch to be already created.
I think if the branch can be created by two different scripts, it might become confusing, especially since they can diverge subtly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This script does not create the release branch. It checks if the release branch is created.
If release-branch exists:
- it creates Release PR on the release-branch, adjusting versions.
If release-branch does not exist:
- it creates Changelog+post-release PR on main branch, adjusting versions accordingly.
i.e. overall through this action, we want to create 2 PRs & 1 release-branch, for each minor release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I think I understand. Can we make this depend on the argument instead? I.e. if you pass it "main" as an argument, it creates the PR to main branch, and if you pass the name of the release branch, it creates a PR to there. This will make it easier to retry any of the steps, i.e. if the release branch was created, but the PR to main failed for some reason, and we need to create it again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if [[ $RELEASE_BRANCH_EXISTS == '0' ]]; then | |
if [[ $RELEASE_BRANCH_EXISTS -eq 0 ]]; then |
Nit.
To create minor release PR commit. Change to no more use a fork, but a branch directly. Prefix release branch , as it'll be a normal branch on timescaledb now.
To create minor release branch.
Adjust script to work without fork, directly.
2fa618b
to
01c617f
Compare
for minor release. For better understanding: - Edit names of steps in the workflow - Edit branch names in the script
@@ -129,6 +138,15 @@ done | |||
|
|||
cd .. | |||
|
|||
|
|||
if [[ $RELEASE_BRANCH_EXISTS == '0' ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if [[ $RELEASE_BRANCH_EXISTS == '0' ]]; then | |
if [[ $RELEASE_BRANCH_EXISTS -eq 0 ]]; then |
Nit.
to create minor release.
Change to no more use a fork, but a branch directly. Prefix release branch , as it'll be a normal branch on timescaledb now.
Generalise script to create the Changelog PR on
main
, when the minor-version branch, e.g.2.18.x
is not yet available.This way, we can run these steps for a new minor version release:
main
,2.18.x
, with PRs being created by the same script.
Disable-check: force-changelog-file
Disable-check: commit-count